package cn.bocweb.spinning.view.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import cn.bocweb.spinning.view.fragment.MainForum2Fragment;

/**
 * Created by chenchangxing on 16/6/28.
 */
public class MainForumAdapter extends FragmentPagerAdapter {

    public MainForumAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        switch (position) {
            case 0: return new MainForum2Fragment();
//            case 1: return new MainForum1Fragment();
            default: return null;
        }
    }

    @Override
    public int getCount() {
        return 1;
    }

//    @Override
//    public CharSequence getPageTitle(int position) {
//        switch (position) {
//            case 0: return "问答";
//            case 1: return "论坛";
//            default: return null;
//        }
//    }
}
